package com.shen.GOF.proxy.moveProxy2;

public class Client {
    public static void main(String[] args) {
        UserServiceImpl userService = new UserServiceImpl();//真实角色

        //代理角色,不存在
        ProxyInvo proxyInvo = new ProxyInvo();

        proxyInvo.setTarget(userService);//设置代理对象
        UserService proxy = (UserService) proxyInvo.gerProxy();//动态生成代理类
        proxy.add();

    }
}
